# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-arrow-db820c
pkgdesc="Arrow DragonBoard 820c"
pkgver=1
pkgrel=5
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	linux-postmarketos-qcom-msm8996
	mkbootimg
	postmarketos-base
	soc-qcom-msm8996
"
makedepends="devicepkg-dev"
source="
	30-gpu-firmware.files
	deviceinfo
	modules-initfs
	"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="GPU/Video firmware"
	depends="linux-firmware-qcom"

	install -Dm644 "$srcdir/30-gpu-firmware.files" -t \
		"$subpkgdir/usr/share/mkinitfs/files"
}

sha512sums="
c0fc060795d8855810a0d6be46adcb02278854804b8d88fda72d8e172b5e9d44ba7ea5d0fece4fdb95e9566938228f6da8e562143242f700545236e71408fc34  30-gpu-firmware.files
a80f4437e40b840d15086bb8c7bc07e0545675077bd0068a8870b97d16e180636a772bc835405d92a03a40b3a0cac44a8c688ee011488ab574095905b2ed62cb  deviceinfo
c648fc8a68acb108a3d43c73f653d9db3744fa7b1c493e9db2453020ce3e55586f190b71c0d6825215c7a42ffef5156b3160932bbdbfe17bfd19d957ffb59a13  modules-initfs
"
